/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package main;

import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import view.KasirFrame;

/**
 *
 * @author jay
 */
public class Kasir {

    private static KasirFrame frame;
    
    public static KasirFrame getFrame() {
        return frame;
    }

    public static void setFrame(KasirFrame frame) {
        Kasir.frame = frame;
    }
    
    public static void main(String[] args) {
         try { 
           UIManager.setLookAndFeel( new WindowsLookAndFeel());
        } catch (UnsupportedLookAndFeelException e) {}
                
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                
                ServicesList.setLocal();
               //server-client-mode 
               ApplicationContext applicationContext =
                       new ClassPathXmlApplicationContext("applicationContext.xml");
               
               //three-tier-mode  
//                ApplicationContext applicationContext =
//                        new ClassPathXmlApplicationContext("clientContext.xml");
              
                frame = new KasirFrame();
                frame.setVisible(true);
            }
        });
    }
}
